package br.com.tcc.automacao.util;



public class SingletonFactory {


	public static boolean forMe = false;
	private SingletonFactory() {
	} 
	public static Object getSingleton(Class clazz) {
		Object single = null;
		try {
			single = clazz.newInstance();
			return single;
		}
		catch(InstantiationException iE) {
			iE.printStackTrace();
		}
		catch(Exception e) {
			e.printStackTrace();
		}
		return single;
	}
	
//	public void addSingleton(Object object) {
//		if(!classes.containsKey(object.getClass())) {
//			classes.put(object.getClass(), false);
//		}
//	}
//
//	public void finalize() {
//		Set keys = classes.keySet();
//		Iterator iterator = keys.iterator();
//		while( iterator.hasNext() ) {
//			Class key = (Class)iterator.next();
//			classes.put(key, false);
//		}
//	}
}
